﻿namespace LCL.RedisCache.Config
{
    /// <summary>
    ///  Redis配置类
    /// </summary>
    public class RedisConfigs
    {
       
        /// <summary>
        /// 获取配置类实例
        /// </summary>
        /// <returns></returns>
        public static RedisConfigInfo GetConfig()
        {
            return RedisConfigFileManager.LoadConfig();
        }

        /// <summary>
        /// 保存配置类实例
        /// </summary>
        /// <param name="configinfo"></param>
        /// <returns></returns>
        public static bool SaveConfig(RedisConfigInfo configinfo)
        {
            RedisConfigFileManager rcfm = new RedisConfigFileManager();
            RedisConfigFileManager.ConfigInfo = configinfo;
            return rcfm.SaveConfig();
        }
    }
}
